
********************************************************************
* Replication Materials for:									   *
* Meaning Beyond Numbers										   *
* Introducing the Plot Staircase to Measure Graphical Preferences  *
*																   *
* Talbot M. Andrews, Justin Curl, & Markus Prior 				   *
* Political Analysis											   *
********************************************************************
	
* Required Packages: 
* ssc install grc1leg2
* set scheme plotplain
* ssc install escftest	
* ssc install somersd
* ssc install tab_chi

set scheme plotplain

* Insert your working directory with all the replication data here:
capture cd "[your working directory here]"

**** Main Text Results *********************************************************

**# Figure 4: Determinants of standardized FAE

	** Panel A: Survey 1: Plot Staircase	
	use "Survey1_Wide.dta", replace
		
	// Graph: Standardized distribution for Adjust Average design (by sample)
		// Figure 4, Panel A
			gen offset0=plot_stair_stand-.025
			sum plot_stair_stand if rg_plot==1 & sample==0, detail
				local m0:di %3.2f r(p50)
			sum plot_stair_stand if rg_plot==1 & sample==1, detail
				local m1:di %3.2f r(p50)			
			mean plot_stair_stand if rg_plot==1, over(sample) coeflegend
				local a0 = _b[c.plot_stair_stand@0.sample]
				local fm_a0: dis %3.2f `a0'
				local a1 = _b[c.plot_stair_stand@1.sample]
				local fm_a1: dis %3.2f `a1'
				local n0 = e(_N)[1,1]
				local n1 = e(_N)[1,2]
			lincom _b[c.plot_stair_stand@0bn.sample] - _b[c.plot_stair_stand@1.sample]
				local tstat = r(t)
				local fm_tstat: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat: dis %-4.3f `pstat'
			lincom _b[c.plot_stair_stand@0.sample] - 1									// test mu=1
				local tstat = r(t)
				local fm_tstat0_eq1: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat0_eq1: dis %-4.3f `pstat'
			lincom _b[c.plot_stair_stand@1.sample] - 1
				local tstat = r(t)
				local fm_tstat1_eq1: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat1_eq1: dis %-4.3f `pstat'
			tabchi plot_stair_stand sample if rg_plot==1
				local chi2 = r(chi2)
				local fm_chi2: dis %-4.1f `chi2'
				local pchi = r(p)
				local fm_pchi: dis %-4.3f `pchi'
			somersd sample plot_stair_stand if rg_plot==1
				local somd = e(b)[1,1]
				local fm_somd: dis %-4.2f `somd'
				local psom = 2*(1-normal(abs(e(b)[1,1]/(e(V)[1,1])^(1/2))))
				local fm_psom: dis %-4.3f `psom'
		twoway 	(histogram offset0 if rg_plot==1 & sample==1, aspect(1) ysize(*.9) color(navy%20) percent bin(31)) ///
				(histogram plot_stair_stand if rg_plot==1 & sample==0, xline(1, lpat(dash) lcol(purple)) color(orange%30) percent bin(31)), ///
			tit("A. Survey 1 (Vaccine Rollout)", size(medium) pos(11) span) subt(" ") ///
			xtit("FAE") ylab(0(5)20, nogrid) xlab(.4 ".4" 1 "1" 1.5 "1.5" 2 "2", format(%9.3f) nogrid) ///
			legend(order(1 "MTurk ({&mu}=`fm_a1', M=`m1', N=`n1')" 2 "VS ({&mu}=`fm_a0', M=`m0', N=`n0')") size(small) rows(2) symx(*.5) ring(1) pos(11))  ///
			note("h{subscript:0}({&mu}{subscript:VS}=1): t=`fm_tstat0_eq1', p=`fm_pstat0_eq1'" ///
				"h{subscript:0}({&mu}{subscript:MT}=1): t=`fm_tstat1_eq1', p=`fm_pstat1_eq1'" ///
				"Equality of distributions: {&chi}{superscript:2}=`fm_chi2', p=`fm_pchi'" ///
				"Equality of {&mu}: t=`fm_tstat', p=`fm_pstat'" ///
				"Equality of M: Somers' D=`fm_somd', p=`fm_psom'", size(small) pos(6) justification(left) linegap(1.5)) ///										
			xsize(3.2) graphregion(color(white)) name(pstair_bysamp, replace) saving(Sv1_Svax_bysamp.gph, replace)	

	** Panel B: Survey 2
		use "Survey2_wide.dta",clear

	* Creating long dataset that has one row each for Past and Future plot staircase
		reshape long pstair@_growth, i(id) j(module) string
			encode module, gen(timeo_temp)
			recode timeo_temp (1=1 "Future") (2=0 "Past"), gen(timeo)
			drop timeo_temp module
			
		gen pstair_growth_stand = (pstair_growth * 4)/8.4 // generate standardized FAE
		
		// Graph: distribution standardized (by sample, plots for P/F)
			// Figure 4, Panel B 
			gen offset0=pstair_growth_stand-.025
			sum pstair_growth_stand if firefox3~=1 & sample==0, detail
				local m0:di %3.2f r(p50)
			sum pstair_growth_stand if firefox3~=1 & sample==1, detail
				local m1:di %3.2f r(p50)			
			mean pstair_growth_stand if firefox3~=1, over(sample) coeflegend
				local a0 = _b[c.pstair_growth_stand@0.sample]
				local fm_a0: dis %3.2f `a0'
				local a1 = _b[c.pstair_growth_stand@1.sample]
				local fm_a1: dis %3.2f `a1'
				local n0 = e(_N)[1,1]
				local n1 = e(_N)[1,2]
			lincom _b[c.pstair_growth_stand@0bn.sample] - _b[c.pstair_growth_stand@1.sample]
				local tstat = r(t)
				local fm_tstat: dis %-4.1f `tstat'
				local pstat = r(p)
				local fm_pstat: dis %-4.3f `pstat'
			lincom _b[c.pstair_growth_stand@0.sample] - 1									// test mu=1
				local tstat = r(t)
				local fm_tstat0_eq1: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat0_eq1: dis %-4.3f `pstat'
			lincom _b[c.pstair_growth_stand@1.sample] - 1
				local tstat = r(t)
				local fm_tstat1_eq1: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat1_eq1: dis %-4.3f `pstat'
			tabchi pstair_growth_stand sample if firefox3~=1
				local chi2 = r(chi2)
				local fm_chi2: dis %-4.1f `chi2'
				local pchi = r(p)
				local fm_pchi: dis %-4.3f `pchi'
			somersd sample pstair_growth_stand if firefox3~=1
				local somd = e(b)[1,1]
				local fm_somd: dis %-4.2f `somd'
				local psom = 2*(1-normal(abs(e(b)[1,1]/(e(V)[1,1])^(1/2))))
				local fm_psom: dis %-4.3f `psom'
		twoway 	(histogram offset0 if firefox3~=1 & sample==1, aspect(1) ysize(*.9) color(navy%20) percent bin(31)) ///
				(histogram pstair_growth_stand if firefox3~=1 & sample==0, xline(1, lpat(dash) lcol(purple)) color(orange%30) percent bin(31)), ///
			tit("B. Survey 2 (Income Growth)", size(medium) pos(11) span) subt(" ") ///
			xtit("FAE") ylab(0(5)35, nogrid) xlab(.28 ".38" 1 "1" 1.8 "1.8", format(%2.1g) nogrid) ///
			legend(order(1 "MTurk ({&mu}=`fm_a1', M=`m1', N=`n1')" 2 "VS ({&mu}=`fm_a0', M=`m0', N=`n0')") size(small) rows(2) symx(*.5) ring(1) pos(12))  ///
			note("h{subscript:0}({&mu}{subscript:VS}=1): t=`fm_tstat0_eq1', p=`fm_pstat0_eq1'" ///
				"h{subscript:0}({&mu}{subscript:MT}=1): t=`fm_tstat1_eq1', p=`fm_pstat1_eq1'" ///
				"Equality of distributions: {&chi}{superscript:2}=`fm_chi2', p=`fm_pchi'" ///
				"Equality of {&mu}: t=`fm_tstat', p=`fm_pstat'" ///
				"Equality of M: Somers' D=`fm_somd', p=`fm_psom'", size(small) pos(6) justification(left) linegap(1.5)) ///										
			xsize(3.2) graphregion(color(white)) name(pstairPooled_bysamp, replace) saving(Sv2_Sgrowth_bysamp.gph, replace)
			
	* Panel C and D: Survey 3
		use "Survey3_wide.dta",clear
		svyset id [pweight=norc_weight2]
		replace norc_weight2 = 1 if sample==1
		gen hist_weight = round(norc_weight2 * 1/.0126606,1)	// workaround to show weighted data in histogram
	
	* Creating long dataset that has one row each for Past and Future
		reshape long pstair@_growth pstair@_jobs, i(id) j(module) string
			encode module, gen(timeo_temp)
			recode timeo_temp (1=1 "Future") (2=0 "Past"), gen(timeo)
			drop timeo_temp module
			
			* Create standardized FAE for both domains
			gen pstair_jobs_stand = pstair_jobs / 243.75
			gen pstair_growth_stand = pstair_growth / 1.3
	
			// Graphs: separate distribution plots Standardized for domain, by sample (pooled over P v F; control only)
				// Figure 4, Panel C
			gen offset0=pstair_jobs_stand-.05
			sum pstair_jobs_stand if r_plot==1 & sample_dom==2 [aw=norc_weight2], detail
				local m0:di %3.2f r(p50)
			sum pstair_jobs_stand if r_plot==1 & sample_dom==3 [aw=norc_weight2], detail
				local m1:di %3.2f r(p50)			
			mean pstair_jobs_stand if r_plot==1 & sample_dom>1 [pw=norc_weight2], vce(cluster id) over(sample_dom) coeflegend
				local a0 = _b[c.pstair_jobs_stand@2.sample_dom]
				local fm_a0: dis %3.2f `a0'
				local a1 = _b[c.pstair_jobs_stand@3.sample_dom]
				local fm_a1: dis %3.2f `a1'
				local n0 = e(_N)[1,1]
				local n1 = e(_N)[1,2]
			lincom _b[c.pstair_jobs_stand@2.sample_dom] - _b[c.pstair_jobs_stand@3.sample_dom]
				local tstat = r(t)
				local fm_tstat: dis %-4.1f `tstat'
				local pstat = r(p)
				local fm_pstat: dis %-4.3f `pstat'
			lincom _b[c.pstair_jobs_stand@2.sample_dom] - 1									// test mu=1
				local tstat = r(t)
				local fm_tstat0_eq1: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat0_eq1: dis %-4.3f `pstat'
			lincom _b[c.pstair_jobs_stand@3.sample_dom] - 1
				local tstat = r(t)
				local fm_tstat1_eq1: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat1_eq1: dis %-4.3f `pstat'
			svy: tab pstair_jobs_stand sample_dom if r_plot==1 & sample_dom>1
				local chi2 = e(F_Pear)
				local fm_chi2: dis %3.1f `chi2'
				local pchi = e(p_Pear)
				local fm_pchi: dis %-4.3f `pchi'
			somersd sample_dom pstair_jobs_stand if r_plot==1 & sample_dom>1 [pw=norc_weight2], cluster(id)
				local somd = e(b)[1,1]
				local fm_somd: dis %-4.2f `somd'
				local psom = 2*(1-normal(abs(e(b)[1,1]/(e(V)[1,1])^(1/2))))
				local fm_psom: dis %-4.3f `psom'
		twoway 	(histogram offset0 				if r_plot==1 & sample_dom==2 [fw=hist_weight], aspect(1) ysize(*.6) color(navy%20) percent bin(31)) ///
				(histogram pstair_jobs_stand 	if r_plot==1 & sample_dom==3, xline(1, lpat(dash) lcol(purple)) color(red%20) percent bin(31)), ///
			tit("C. Survey 3 (Job Creation)", size(medium) pos(11) span) subt(" ") ///
			xtit("FAE") ylab(0(5)35, nogrid) xlab(0.45 1 2 3, nogrid) ///
			legend(order(1 "NORC ({&mu}=`fm_a0', M=`m0', N=`n0')" 2 "MTurk ({&mu}=`fm_a1', M=`m1', N=`n1')" ) size(small) rows(2) symx(*.5) ring(1) pos(12))  ///
			note("h{subscript:0}({&mu}{subscript:NORC}=1): t=`fm_tstat0_eq1', p=`fm_pstat0_eq1'" ///
				"h{subscript:0}({&mu}{subscript:MTurk}=1): t=`fm_tstat1_eq1', p=`fm_pstat1_eq1'" ///
				"Equality of distributions: {&chi}{superscript:2}=`fm_chi2', p=`fm_pchi'" ///
				"Equality of {&mu}: t=`fm_tstat', p=`fm_pstat'" ///
				"Equality of M: Somers' D=`fm_somd', p=`fm_psom'", size(small) pos(6) justification(left) linegap(1.5)) ///										
			xsize(3.2) graphregion(color(white)) name(pstairPooled_jobs, replace) saving(Sv3_Sjobs_bysamp.gph, replace)

			// Graphs: Job v Income (pooled over P v F; control only)
				// Figure 4, Panel D
			gen pstair_stand = pstair_jobs_stand
				replace pstair_stand = pstair_growth_stand if pstair_stand == . 
			gen offsettemp=pstair_stand-.05
			sum pstair_stand if r_plot==1 & sample_dom==1 [aw=norc_weight2], detail
				local m0:di %3.2f r(p50)
			sum pstair_stand if r_plot==1 & sample_dom==2 [aw=norc_weight2], detail
				local m1:di %3.2f r(p50)			
			mean pstair_stand if r_plot==1 & sample_dom<3 [pw=norc_weight2], vce(cluster id) over(sample_dom) coeflegend
				local a0 = _b[c.pstair_stand@1.sample_dom]
				local fm_a0: dis %3.2f `a0'
				local a1 = _b[c.pstair_stand@2.sample_dom]
				local fm_a1: dis %3.2f `a1'
				local n0 = e(_N)[1,1]
				local n1 = e(_N)[1,2]
			lincom _b[c.pstair_stand@1.sample_dom] - _b[c.pstair_stand@2.sample_dom]
				local tstat = r(t)
				local fm_tstat: dis %3.1f `tstat'
				local pstat = r(p)
				local fm_pstat: dis %-4.3f `pstat'
			lincom _b[c.pstair_stand@1.sample_dom] - 1									// test mu=1
				local tstat = r(t)
				local fm_tstat0_eq1: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat0_eq1: dis %-4.3f `pstat'
			lincom _b[c.pstair_stand@2.sample_dom] - 1
				local tstat = r(t)
				local fm_tstat1_eq1: dis %-3.1f `tstat'
				local pstat = r(p)
				local fm_pstat1_eq1: dis %-4.3f `pstat'
			svy: tab pstair_stand sample_dom if r_plot==1 & sample_dom<3
				local chi2 = e(F_Pear)
				local fm_chi2: dis %3.1f `chi2'
				local pchi = e(p_Pear)
				local fm_pchi: dis %-4.3f `pchi'
			somersd sample_dom pstair_stand if r_plot==1 & sample_dom<3 [pw=norc_weight2], cluster(id)
				local somd = e(b)[1,1]
				local fm_somd: dis %-4.2f `somd'
				local psom = 2*(1-normal(abs(e(b)[1,1]/(e(V)[1,1])^(1/2))))
				local fm_psom: dis %-4.3f `psom'
		twoway 	(histogram offsettemp 		if r_plot==1 & sample_dom==1 [fw=hist_weight], aspect(1) ysize(*.6) color(lavender%50) percent bin(31)) ///
				(histogram pstair_stand 	if r_plot==1 & sample_dom==2, xline(1, lpat(dash) lcol(purple))  color(green%20) percent bin(31)), ///
			tit("D. Survey 3 (NORC, by domain)", size(medium) pos(11) span) subt(" ") ///
			xtit("FAE") ylab(0(5)35, nogrid) xlab(0.45 1 2 3, nogrid) ///
			legend(order(1 "Growth ({&mu}=`fm_a0', M=`m0', N=`n0')" 2 "Jobs ({&mu}=`fm_a1', M=`m1', N=`n1')") size(small) rows(2) symx(*.5) ring(1) pos(12))  ///
			note("h{subscript:0}({&mu}{subscript:Growth}=1): t=`fm_tstat0_eq1', p=`fm_pstat0_eq1'" ///
				"h{subscript:0}({&mu}{subscript:Jobs}=1): t=`fm_tstat1_eq1', p=`fm_pstat1_eq1'" ///
				"Equality of distributions: {&chi}{superscript:2}=`fm_chi2', p=`fm_pchi'" ///
				"Equality of {&mu}: t=`fm_tstat', p=`fm_pstat'" ///
				"Equality of M: Somers' D=`fm_somd', p=`fm_psom'", size(small) pos(6) justification(left) linegap(1.5)) ///										
			xsize(3.2) graphregion(color(white)) saving(Sv3_Sjobs_bydom.gph, replace)
	
	* Combining Graphs to make Figure 4
		graph combine 	Sv1_Svax_bysamp.gph /// A. Survey 1
						Sv2_Sgrowth_bysamp.gph /// B. Survey 2
						Sv3_Sjobs_bysamp.gph /// C. Survey 3
						Sv3_Sjobs_bydom.gph /// D. Survey 3
				, iscale(*1.7) altshrink col(2) ysize(8) graphregion(color(white) margin(b-2)) 
		graph export Fig3.png, height(1500) replace


**# Figure 5: Relationship of FAE and Ratings Approach, Vaccine Rollout (Survey 1) 
	use Survey1_Long.dta, replace
	xtset seqID jdim

		// Trend/Average Indicators for mirrored plots for ratings approach
		recode jdim (5=1 "-7.5m") (4=2 "-6m") (1=3 "+6m") (2=4 "+7.5m") (else=.), gen(trend4_vax) // generate trend variables
		recode jdim (5 4=1 "drop") (1 2=2 "Increasing") (else=.), gen(trend2_vax) // generate trend variables
							
			* Line Graphs (MT, VS)
			mixed eval i.trend2_vax##c.plot_stair_stand i.trend2_vax##i.samplebar || seqID: i.trend2_vax if rg_plot == 1 & samplebar != 0, stddev
			estadd scalar N_clust = e(N_g)[1,1]	// to store N of respondents
				est store SurvC_RatingFAE_line

			margins, at(plot_stair_stand = (.425(.31)1.975)) over(trend2_vax)
			marginsplot, recastci(rarea) ///	
				plot1opts(msymbol(none)) ci1opts(color("252 255 164%70") lcolor("199 205 0")) /// 
				plot2opts(msymbol(none)) ci2opts(color("158 106 162%50") lcolor("158 106 162")) /// 
				addplot(scatter eval plot_stair_stand if trend2_vax == 2, msymbol(triangle) mcolor("158 106 162%15") jitter(3) ///
				|| scatter eval plot_stair_stand if trend2_vax == 1, msymbol(circle) mcolor("214 220 89%15") jitter(3) below ///
				xlab(.425 ".425" 1 "1" 1.975 "1.975", format(%9.3f) nogrid labsize(med)) ///
				legend(order(1 "Decreasing" 2 "Increasing") size(med) subtit("Slope", size(medlarge)) region(lcolor(black)) col(2))) ///
				xlab(.425 ".425" 1 "1" 1.975 "1.975", format(%9.3f) nogrid labsize(med)) ///
				ylab(0(2)10, nogrid labsize(med)) ytit("Predicted Plot Evaluations", size(med)) xtit("FAE", size(med)) ///
				xline(1, lpat(dash) lcol(purple)) title("Survey 1 (Vaccines)", size(medlarge)) legend(pos(6)) ///
				saving(Surv1_ratings.gph, replace)
			graph export Fig4.png, height(1500) replace
			
**# Table 2: Correlates of Standardized FAE

	* Survey 1
	use Survey1_Wide.dta, replace
		svyset seqID
		
		* Recode covariates
		recode vaxed (1=0) (2/4=1), gen(vaxed1)
		recode vaxint (0/1=1 "Vaccinated or as soon as available") (2/4=2 "Later") (5=3 "Won't get vaccinated"), gen(vaxint3)
		recode vaxall (1 2=1 "Before end of May") (3/5=2 "June or later"), gen(vaxall2)
		recode vaxall (1=1 "Right away") (2=2 "Before end of May") (3/5=3 "June or later"), gen(vaxall3)
		recode age (min/29=1 "18-29") (30/44=2 "30-44") (45/59=3 "45-59") (60/max=4 "60+"), gen(age4)
	
		* Moderators in control group
			regress plot_stair_stand i.vaxall3 i.vaxint3 c.numeracy i.educ4_asnorc i.age4 i.female i.pid3wL  i.sample if rg_plot==1
				est store Surv1_mods
			regress plot_stair_stand c.numeracy i.educ4_asnorc i.age4 i.female i.pid3wL  i.sample if rg_plot==1
				est store Surv1_modsA

			* interaction with numeracy // not improved when combined, not in paper but keep for our knowledge
			regress plot_stair_stand i.vaxall3##c.numeracy i.vaxint3##c.numeracy i.educ4_asnorc i.age4 i.female i.pid3wL  i.sample if rg_plot==1
				lrtest . Surv1_mods
	
	* Survey 2
	use Survey2_wide.dta,clear
		svyset id

		// Creating long dataset that has one row each for Past and Future
		reshape long pstair@_growth, i(id) j(module) string
			encode module, gen(timeo_temp)
			recode timeo_temp (1=1 "Future") (2=0 "Past"), gen(timeo)
			drop timeo_temp module
			
		gen pstair_growth_stand = (pstair_growth * 4)/8.4 // create standardized FAE

		* numeracy (pooling Time)
			regress pstair_growth_stand c.numeracy i.educ4_asnorc i.age4 i.female i.pid3wL ib1.timeo i.sample, robust
				est store Surv2_mods
			
	* Survey 3
	use Survey3_wide.dta,clear
		svyset id [pweight=norc_weight2]
		replace norc_weight2 = 1 if sample==1
	
		// Creating long dataset that has one row each for Past and Future
		reshape long pstair@_score pstair@_rev pstair@_growth pstair@_jobs, i(id) j(module) string
			encode module, gen(timeo_temp)
			recode timeo_temp (1=1 "Future") (2=0 "Past"), gen(timeo)
			drop timeo_temp module
			
			* Generate standardized FAE
			gen pstair_jobs_stand = pstair_jobs / 243.75
			gen pstair_growth_stand = pstair_growth / 1.3
			gen pstair_stand = pstair_jobs_stand
			replace pstair_stand = pstair_growth_stand if pstair_stand == . 
				
		* numeracy, impatience in control group (pooling Time)
			regress pstair_growth_stand c.numeracy i.educ4_asnorc i.age4 i.female i.pid3wL ib1.timeo if r_plot==1 & sample_dom==1, robust
				est store Surv3_growth_mods	
				
			regress pstair_jobs_stand 	c.numeracy i.educ4_asnorc i.age4 i.female i.pid3wL ib1.timeo i.sample if r_plot==1 & inlist(sample_dom,2,3), robust
				est store Surv3_jobs_mods
			
	* Table 2 Output
		lab var numeracy "Numeracy (0-3)"
		lab var educ4_asnorc "Education"
		
		
		esttab Surv1_modsA Surv1_mods Surv2_mods Surv3_growth_mods Surv3_jobs_mods using Table2.rtf, replace var(22) model(10) ///
				eqlabels("") nobase noomit star(* 0.05 ** 0.01 *** 0.001) b(%4.3f) se wide one  interact(" x ") ///
				title("Table 2. Correlates of Standardized FAE.") nonumbers mtitles("Study 1 Vaccine" "Study 1 Vaccine" "Study 2 Growth" "Study 3 Growth" "Study 3 Jobs") ///
				coeflab(_cons "Constant" 2.vaxall3 "By end of May" 3.vaxall3 "By end of June or later" 2.vaxint3 "Later" 3.vaxint3 "Won't get vaccinated" 1.sample "MTurk") ///
				note("Standard errors in parentheses.") scalars(r2) ///
				obslast sfmt(%9.3f %9.3f)	///
				label rename(`fixR')

**** Supplement Results ********************************************************

**#Table E2: Relationship between sequence evaluation and FAE
	use Survey1_Long, replace
	xtset seqID jdim

		// Trend/Average Indicators for mirrored plots 
		recode jdim (5=1 "-7.5m") (4=2 "-6m") (1=3 "+6m") (2=4 "+7.5m") (else=.), gen(trend4_vax)
		recode jdim (5 4=1 "drop") (1 2=2 "Increasing") (else=.), gen(trend2_vax)
				
		* Include Line Graphs (MT, VS)
			mixed eval i.trend2_vax##c.plot_stair_stand i.trend2_vax##i.samplebar || seqID: i.trend2_vax if rg_plot == 1 & samplebar != 0, stddev
			estadd scalar N_clust = e(N_g)[1,1]	// to store N of respondents
				est store SurvC_RatingFAE_line
				
		* Output results
				lab var plot_stair "FAE"
				esttab SurvC_RatingFAE_line  using TableE2.rtf, replace var(22) model(10) ///
					drop(ln*: ) eqlabels("") nobase noomit star(* 0.05 ** 0.01 *** 0.001) b(%4.2f) se wide one interact(" x ") ///
					title("Table H1. The relationship between FAE and plot ratings.")  ///
					nonumbers coeflab(_cons "Constant" plot_stair_stand "Standardized FAE") mtitles("Line Plots" "Bar Plots") ///
					note("Standard errors in parentheses. Random effects variances and heterogenous residual variances are included but not shown.") ///
					obslast scalars("ll Log Likelihood" "N_clust No. Respondents") sfmt(%9.1f %9.0f) label


**# Figure F3: Alternative Staircase Results
	use Survey1_Wide.dta, replace
	
	gen offsetsl=plot_stair-.1
			sum plot_stair if rg_plot==2 & sample==0, detail
				local m0:di %3.1f r(p50)
			sum plot_stair if rg_plot==2 & sample==1, detail
				local m1:di %3.1f r(p50)			
			mean plot_stair if rg_plot==2, over(sample) coeflegend
				local a0 = _b[c.plot_stair@0.sample]
				local fm_a0: dis %3.1f `a0'
				local a1 = _b[c.plot_stair@1.sample]
				local fm_a1: dis %3.1f `a1'
				local n0 = e(_N)[1,1]
				local n1 = e(_N)[1,2]
			lincom _b[c.plot_stair@0bn.sample] - _b[c.plot_stair@1.sample]
				local tstat = r(t)
				local fm_tstat: dis %-4.1f `tstat'
				local pstat = r(p)
				local fm_pstat: dis %-4.3f `pstat'
			tabchi plot_stair sample if rg_plot==2
				local chi2 = r(chi2)
				local fm_chi2: dis %-4.1f `chi2'
				local pchi = r(p)
				local fm_pchi: dis %-4.3f `pchi'
			somersd sample plot_stair if rg_plot==2
				local somd = e(b)[1,1]
				local fm_somd: dis %-4.2f `somd'
				local psom = 2*(1-normal(abs(e(b)[1,1]/(e(V)[1,1])^(1/2))))
				local fm_psom: dis %-4.3f `psom'
		twoway 	(histogram offsetsl if rg_plot==2 & sample==1, aspect(1) ysize(*.9) color(navy%20) percent bin(31)) ///
				(histogram plot_stair if rg_plot==2 & sample==0, color(orange%30) percent bin(31)), ///
			tit("Survey 1 (Vaccine Rollout)", size(medium) pos(11) span) subt(" ") ///
			xtit("Slope Required for Indifference") ylab(0(20)60, nogrid) xlab(0 "0" 2 "2" 4 "4" 6 "6" 8 "8", format(%9.3f) nogrid) ///
			legend(order(1 "MTurk ({&mu}=`fm_a1', M=`m1', N=`n1')" 2 "VS ({&mu}=`fm_a0', M=`m0', N=`n0')") size(small) rows(2) symx(*.5) ring(1) pos(11))  ///
			note("Equality of distributions: {&chi}{superscript:2}=`fm_chi2', p=`fm_pchi'" "Equality of {&mu}: t=`fm_tstat', p=`fm_pstat'" "Equality of M: Somers' D=`fm_somd', p=`fm_psom'", pos(6) justification(left) linegap(1.5)) ///										
			xsize(3.2) graphregion(color(white)) name(pstair_bysamp, replace) 
		graph export FigF3.png, height(1500) replace



			